<%@ page import="Course.CourseEnity" %>
<%@ page import="Course.CourseDao" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/8/17
  Time: 10:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>课程详细信息</title>
    <link href="/SystemerNav/SystemerNav.css" rel="stylesheet" type="text/css">
</head>
<script>
    function onUpdate() {
        alert("数据已修改");
    }
    function onDelete() {
        alert("数据已删除");
    }
</script>
<body background="/LoginInterface/loginFace.jpg">
<div class="container">
    <%
        String courseNo=request.getParameter("courseNo");
        CourseDao courseDao=new CourseDao();
        CourseEnity courseEnity=courseDao.getCourse(courseNo);
    %>
    <form action="/CourseServlet/updateCourseServlet" method="post">
        <table>
            <tr><td colspan="7" width="350px" align="center">课程详细信息</td></tr>
            <tr><td>课程号</td>
                <td>课程名</td>
                <td>学分</td>
                <td>教室</td>
                <td>总学时</td>
                <td>数据修改</td>
                <td>数据删除</td>
            </tr>
            <tr>
                <td><%=courseEnity.getCourseNo()%></td>
                <td><input type="text" name="courseName" value="<%=courseEnity.getCourseName()%>"></td>
                <td><input type="text" name="credit" value="<%=courseEnity.getCredit()%>" size="4"></td>
                <td><input type="text" name="classRoom" value="<%=courseEnity.getClassRoom()%>"></td>
                <td><input type="text" name="classHour" value="<%=courseEnity.getClassHour()%>" size="4"></td>
                <td ><input type="submit" value="修改" onclick="onUpdate()">
                    <input type="hidden" name="courseNo" value="<%=courseEnity.getCourseNo()%>"></td>
                <td><a href="/CourseServlet/deleteCourseServlet?courseNo=<%=courseEnity.getCourseNo()%>"  onclick="onDelete()">删除</a></td>
            </tr>

        </table>

    </form>
</div>
</body>
</html>
